package com.ctsi.ssdc.admin.repository.oracle;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectKey;
import org.springframework.stereotype.Repository;

import com.ctsi.ssdc.admin.domain.CscpLogLogin;
import com.ctsi.ssdc.admin.repository.CscpLogLoginRepository;
import com.ctsi.ssdc.admin.repository.CscpLogLoginSqlProvider;

/**
 * @author MyBatis Generator
*/

public interface CscpLogLoginRepositoryForOracle extends CscpLogLoginRepository{
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cscp_log_login
     *
     * @mbg.generated Fri Aug 03 08:51:06 CST 2018
     */
    @Insert({
        "insert into cscp_log_login (id, user_name, ip, ",
        "message, time, ",
        "status)",
        "values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR}, ",
        "#{message,jdbcType=VARCHAR}, #{time,jdbcType=TIMESTAMP}, ",
        "#{status,jdbcType=VARCHAR})"
    })
    @SelectKey(statement="select SEQ_CSCP_LOG_LOGIN_ID.nextval as id from dual", keyProperty="id", before=true, resultType=Integer.class)
    int insert(CscpLogLogin record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cscp_log_login
     *
     * @mbg.generated Fri Aug 03 08:51:06 CST 2018
     */
    @InsertProvider(type=CscpLogLoginSqlProvider.class, method="insertSelective")
    @SelectKey(statement="select SEQ_CSCP_LOG_LOGIN_ID.nextval as id from dual", keyProperty="id", before=true, resultType=Integer.class)
    int insertSelective(CscpLogLogin record);

}